import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
// 导入图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
// 全局导入加载loading效果组件
import Loading from "@/components/loading/loading.vue";
import Config from "@/components/config/config.vue";
// axios
import axios from "axios";
// 状态管理pinia
import store from "./store";
// 导入element插件
import ElementPlus from 'element-plus'
// 引入element样式
import 'element-plus/dist/index.css'
// 配置路由
import router from "./router";

const app = createApp(App);
// 配置aixos
app.config.globalProperties.$axios = axios;
// 挂载Loading加载效果
// app.component("Loading", Loading);
// 挂载所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 挂载路由router
app.use(router);
// 挂载路由store
app.use(store);
// 挂载element
app.use(ElementPlus);
// 挂载app的div
app.mount('#app');
